﻿<%@page import="java.util.*" %>
<%
	if(session.getAttribute("hotelId") != null)
	{
		Long hotelId = (Long)session.getAttribute("hotelId");
		Long userId = (Long)session.getAttribute("userid");
		if(hotelId != 0 && userId != null)
			response.sendRedirect("task.jsp"); 
	}
%>

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Login | Eem tech soft</title>
<link href="/css/components/blocked/popup/popup.css" rel="stylesheet" />
<link href="css/custom/jquery-ui-1.9.1.custom.css" rel="stylesheet" />
<!--<link href="css/custom/jquery-ui-1.9.1.custom.min.css" rel="stylesheet" />-->
<link href="/css/components/blocked/popup/popup.css" rel="stylesheet" />
<link href="css/components/login/login-box.css" rel="stylesheet" />
<link href="css/custom/loading.css" rel="stylesheet" />

<script src="/js/jquery-1.8.3.min.js"></script>
<script src="/js/jquery-ui-1.9.1.custom.min.js"></script>
<script src="/js/components/login/login.js"></script>
<script src="/js/loading.js"></script>
<script src="/js/simpleservice.js"></script>
</head>

<style type="text/css">
body { font-size: 62.5%; }
</style>

<SCRIPT TYPE="text/javascript">
<!--
function submitenter(myfield,e)
{
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;

if (keycode == 13)
   {
   login();
   return false;
   }
else
   return true;
}
function parseDateTime(e){var t=e.split(" ")[1].split(":");var n=$.datepicker.parseDate("yy-mm-dd",e.split(" ")[0]);n.setHours(t[0]);n.setMinutes(t[1]);n.setSeconds(t[2]);return n}
</SCRIPT>

<body >
<center>
<div class="login-box">
<H2>Login</H2>
	<div class="login-box-name login-first-field">Hotel Code:</div>
	<div class="login-box-field login-first-field">
		<input name="hotel_id" class="form-login" id="hotel_id" title="Hotel Code" value="1" size="30" maxlength="24" onKeyPress="return submitenter(this,event)"/>
	</div>
	<div class="login-box-name">Email:</div>
	<div class="login-box-field">
		<input name="email" class="form-login" id="email" title="Username" value="jesus.way@hotmail.com" size="30" maxlength="2048" onKeyPress="return submitenter(this,event)"/>
	</div>
	<div class="login-box-name">Password:</div>
	<div class="login-box-field">
		<input name="pass" type="password" class="form-login" id="pass" title="Password" value="opensource" size="30" maxlength="2048"  onKeyPress="return submitenter(this,event)"/>
	</div>
<br />
	<span class="login-box-options">
		<input type="checkbox" name="1" value="1"> Remember Me 
		<a href="javascript:void(0);" style="margin-left:30px;">Forgot password?</a>
	</span>
<br />
<br />
<a href="javascript:login();" ><img src="images/components/login/login-btn.png" width="103" height="42" style="margin-left:90px;" / ></a>
</div>
</center>

<div id="loginFail" title="Login Incorrect" style="display:none">
  <p>
     Please check your HotelId E-mail and Password
  </p>
</div>

<div id="loginShort" title="Frist Login" style="display:none">
  <p>
     Please use full hotelId from manager
  </p>
</div>

<div id="loginTimeout" title="Timeout" style="display:none">
  <p>
     Connection Timeout.
  </p>
</div>

<div id="loadingScreen"></div>

</body>
</html>
